	<style>
	.offers{
	width:100% !important;
	}
	</style>
<?php //echo "cccccccc"; exit?>
	<div id="ratescontent" class="offers">

                <div class="fullBlock hgroupheader" >
                    <div class="spcloffer" align="center">Special Offer Type</div>
                    <div class="spcloffer" align="center">Promo Code</div>
                    <div class="spcloffer" align="center">Valid From</div>
                    <div class="spcloffer" align="center">Valid Until</div>
                    <div class="spcloffer" align="center">Minimum Night Stay</div>                  
                    <div class="spcloffer" align="center">Discount Offers or Freebies</div>                  
                    <div class="spcloffer" align="center">Book by Date</div>                  
                </div>
                <?
                for ($i = 0; $i < count($this->spclData); $i++)
                {
                    ?>
                    <div class="fullBlock whiteBg">
                        <div class="spcloffer" align="center"><?= $this->spclData[$i]['discount_type'] == '1' && $this->spclData[$i]['free_nights_type'] == 'variable' ? 'Every ' . ($this->spclData[$i]['discount_offer'] + 1) . 'th night free' : $this->spclData[$i]['type_name'] ?></div>
                        <div class="spcloffer" align="center"><?= $this->spclData[$i]['promo_code'] ?></div>
                        <div class="spcloffer" align="center"><?= date('d-m-Y', strtotime($this->spclData[$i]['valid_from'])) ?></div>
                        <div class="spcloffer" align="center"><? echo date('d-m-Y', strtotime($this->spclData[$i]['valid_to'])) ?></div>        
                        <div class="spcloffer" align="center"><? echo $this->spclData[$i]['min_night'] != NULL ? $this->spclData[$i]['min_night'] : $this->spclData[$i]['MIN_NIGHTS'] ?></div>
                        <div class="spcloffer" align="center"><?
        switch ($this->spclData[$i]['discount_type'])
        {
            case '0': echo $this->spclData[$i]['discount_offer'] . "%";
                break;
            case '1': if ($this->spclData[$i]['free_nights_type'] == 'variable')
                    echo "Max Free Nights: " . ($this->spclData[$i]['max_night']) . "";
                else
                    echo "Free Nights:" . $this->spclData[$i]['discount_offer'];
                break;
            case '2': echo "Free Pool Heating";
                break;
            case '3': echo "7 nights Free";
                break; //echo $this->spclData[$i]['min_nights_type']=='0'?$this->spclData[$i]['min_night']." nights":$this->spclData[$i]['MIN_NIGHTS']." nights"; break;
        }
                    ?></div>                    
                        <div class="spcloffer" align="center"><? echo date('d-m-Y', strtotime($this->spclData[$i]['book_by'])) ?></div>                    
                    </div>   
                    <?
                }
                ?>

            </div>